fileresource

package
v0.20240117.1134535 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 17, 2024 License: MPL-2.0 Imports: 12 Imported by: 1

README

github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/fileresource Documentation

The fileresource SDK allows for interaction with the Azure Resource Manager Service datamigration (API Version 2021-06-30).

This readme covers example usages, but further information on using this SDK can be found in the project root.

Import Path

import "github.com/hashicorp/go-azure-sdk/resource-manager/datamigration/2021-06-30/fileresource"

Client Initialization

client := fileresource.NewFileResourceClientWithBaseURI("https://management.azure.com")
client.Client.Authorizer = authorizer

Example Usage: FileResourceClient.FilesDelete

ctx := context.TODO()
id := fileresource.NewFileID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "fileValue")

read, err := client.FilesDelete(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: FileResourceClient.FilesGet

ctx := context.TODO()
id := fileresource.NewFileID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "fileValue")

read, err := client.FilesGet(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: FileResourceClient.FilesList

ctx := context.TODO()
id := fileresource.NewProjectID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue")

// alternatively `client.FilesList(ctx, id)` can be used to do batched pagination
items, err := client.FilesListComplete(ctx, id)
if err != nil {
	// handle the error
}
for _, item := range items {
	// do something
}

Example Usage: FileResourceClient.FilesRead

ctx := context.TODO()
id := fileresource.NewFileID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "fileValue")

read, err := client.FilesRead(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: FileResourceClient.FilesReadWrite

ctx := context.TODO()
id := fileresource.NewFileID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "fileValue")

read, err := client.FilesReadWrite(ctx, id)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Example Usage: FileResourceClient.FilesUpdate

ctx := context.TODO()
id := fileresource.NewFileID("12345678-1234-9876-4563-123456789012", "resourceGroupValue", "serviceValue", "projectValue", "fileValue")

payload := fileresource.ProjectFile{
	// ...
}


read, err := client.FilesUpdate(ctx, id, payload)
if err != nil {
	// handle the error
}
if model := read.Model; model != nil {
	// do something with the model/response object
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateFileID

func ValidateFileID(input interface{}, key string) (warnings []string, errors []error)

ValidateFileID checks that 'input' can be parsed as a File ID

func ValidateProjectID

func ValidateProjectID(input interface{}, key string) (warnings []string, errors []error)

ValidateProjectID checks that 'input' can be parsed as a Project ID

Types

type FileId

type FileId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ProjectName       string
	FileName          string
}

FileId is a struct representing the Resource ID for a File

func NewFileID

func NewFileID(subscriptionId string, resourceGroupName string, serviceName string, projectName string, fileName string) FileId

NewFileID returns a new FileId struct

func ParseFileID

func ParseFileID(input string) (*FileId, error)

ParseFileID parses 'input' into a FileId

func ParseFileIDInsensitively

func ParseFileIDInsensitively(input string) (*FileId, error)

ParseFileIDInsensitively parses 'input' case-insensitively into a FileId note: this method should only be used for API response data and not user input

func (*FileId) FromParseResult added in v0.20231127.1171502

func (id *FileId) FromParseResult(input resourceids.ParseResult) error

func (FileId) ID

func (id FileId) ID() string

ID returns the formatted File ID

func (FileId) Segments

func (id FileId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this File ID

func (FileId) String

func (id FileId) String() string

String returns a human-readable description of this File ID

type FileResourceClient

type FileResourceClient struct {
	Client *resourcemanager.Client
}

func NewFileResourceClientWithBaseURI

func NewFileResourceClientWithBaseURI(sdkApi sdkEnv.Api) (*FileResourceClient, error)

func (FileResourceClient) FilesDelete

func (c FileResourceClient) FilesDelete(ctx context.Context, id FileId) (result FilesDeleteOperationResponse, err error)

FilesDelete ...

func (FileResourceClient) FilesGet

func (c FileResourceClient) FilesGet(ctx context.Context, id FileId) (result FilesGetOperationResponse, err error)

FilesGet ...

func (FileResourceClient) FilesList

func (c FileResourceClient) FilesList(ctx context.Context, id ProjectId) (result FilesListOperationResponse, err error)

FilesList ...

func (FileResourceClient) FilesListComplete

func (c FileResourceClient) FilesListComplete(ctx context.Context, id ProjectId) (FilesListCompleteResult, error)

FilesListComplete retrieves all the results into a single object

func (FileResourceClient) FilesListCompleteMatchingPredicate

func (c FileResourceClient) FilesListCompleteMatchingPredicate(ctx context.Context, id ProjectId, predicate ProjectFileOperationPredicate) (result FilesListCompleteResult, err error)

FilesListCompleteMatchingPredicate retrieves all the results and then applies the predicate

func (FileResourceClient) FilesRead

func (c FileResourceClient) FilesRead(ctx context.Context, id FileId) (result FilesReadOperationResponse, err error)

FilesRead ...

func (FileResourceClient) FilesReadWrite

func (c FileResourceClient) FilesReadWrite(ctx context.Context, id FileId) (result FilesReadWriteOperationResponse, err error)

FilesReadWrite ...

func (FileResourceClient) FilesUpdate

func (c FileResourceClient) FilesUpdate(ctx context.Context, id FileId, input ProjectFile) (result FilesUpdateOperationResponse, err error)

FilesUpdate ...

type FileStorageInfo

type FileStorageInfo struct {
	Headers *map[string]string `json:"headers,omitempty"`
	Uri     *string            `json:"uri,omitempty"`
}

type FilesDeleteOperationResponse

type FilesDeleteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
}

type FilesGetOperationResponse

type FilesGetOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ProjectFile
}

type FilesListCompleteResult

type FilesListCompleteResult struct {
	LatestHttpResponse *http.Response
	Items              []ProjectFile
}

type FilesListOperationResponse

type FilesListOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *[]ProjectFile
}

type FilesReadOperationResponse

type FilesReadOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileStorageInfo
}

type FilesReadWriteOperationResponse

type FilesReadWriteOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *FileStorageInfo
}

type FilesUpdateOperationResponse

type FilesUpdateOperationResponse struct {
	HttpResponse *http.Response
	OData        *odata.OData
	Model        *ProjectFile
}

type ProjectFile

type ProjectFile struct {
	Etag       *string                `json:"etag,omitempty"`
	Id         *string                `json:"id,omitempty"`
	Name       *string                `json:"name,omitempty"`
	Properties *ProjectFileProperties `json:"properties,omitempty"`
	SystemData *systemdata.SystemData `json:"systemData,omitempty"`
	Type       *string                `json:"type,omitempty"`
}

type ProjectFileOperationPredicate

type ProjectFileOperationPredicate struct {
	Etag *string
	Id   *string
	Name *string
	Type *string
}

func (ProjectFileOperationPredicate) Matches

type ProjectFileProperties

type ProjectFileProperties struct {
	Extension    *string `json:"extension,omitempty"`
	FilePath     *string `json:"filePath,omitempty"`
	LastModified *string `json:"lastModified,omitempty"`
	MediaType    *string `json:"mediaType,omitempty"`
	Size         *int64  `json:"size,omitempty"`
}

func (*ProjectFileProperties) GetLastModifiedAsTime

func (o *ProjectFileProperties) GetLastModifiedAsTime() (*time.Time, error)

func (*ProjectFileProperties) SetLastModifiedAsTime

func (o *ProjectFileProperties) SetLastModifiedAsTime(input time.Time)

type ProjectId

type ProjectId struct {
	SubscriptionId    string
	ResourceGroupName string
	ServiceName       string
	ProjectName       string
}

ProjectId is a struct representing the Resource ID for a Project

func NewProjectID

func NewProjectID(subscriptionId string, resourceGroupName string, serviceName string, projectName string) ProjectId

NewProjectID returns a new ProjectId struct

func ParseProjectID

func ParseProjectID(input string) (*ProjectId, error)

ParseProjectID parses 'input' into a ProjectId

func ParseProjectIDInsensitively

func ParseProjectIDInsensitively(input string) (*ProjectId, error)

ParseProjectIDInsensitively parses 'input' case-insensitively into a ProjectId note: this method should only be used for API response data and not user input

func (*ProjectId) FromParseResult added in v0.20231127.1171502

func (id *ProjectId) FromParseResult(input resourceids.ParseResult) error

func (ProjectId) ID

func (id ProjectId) ID() string

ID returns the formatted Project ID

func (ProjectId) Segments

func (id ProjectId) Segments() []resourceids.Segment

Segments returns a slice of Resource ID Segments which comprise this Project ID

func (ProjectId) String

func (id ProjectId) String() string

String returns a human-readable description of this Project ID

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL