Skip to content

Commit

Permalink
fix LRO options type name
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendrixMSFT committed Jan 17, 2024
1 parent d7fa5d4 commit e0e1d54
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions sdk/data/azappconfig/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,10 +382,10 @@ func (c *Client) NewListSettingsForSnapshotPager(snapshotName string, options *L
//
// - snapshotName - The name of the snapshot to create.
// - settingFilter - The filters to apply on the key-values.
// - options - CreateSnapshotOptions contains the optional parameters to create a Snapshot
func (c *Client) BeginCreateSnapshot(ctx context.Context, snapshotName string, settingFilter []SettingFilter, options *CreateSnapshotOptions) (*runtime.Poller[CreateSnapshotResponse], error) {
// - options - BeginCreateSnapshotOptions contains the optional parameters to create a Snapshot
func (c *Client) BeginCreateSnapshot(ctx context.Context, snapshotName string, settingFilter []SettingFilter, options *BeginCreateSnapshotOptions) (*runtime.Poller[CreateSnapshotResponse], error) {
if options == nil {
options = &CreateSnapshotOptions{}
options = &BeginCreateSnapshotOptions{}
}

filter := make([]generated.KeyValueFilter, len(settingFilter))
Expand Down
2 changes: 1 addition & 1 deletion sdk/data/azappconfig/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ func CreateSnapshot(c *azappconfig.Client, snapshotName string, sf []azappconfig
}
}

opts := &azappconfig.CreateSnapshotOptions{
opts := &azappconfig.BeginCreateSnapshotOptions{
RetentionPeriod: to.Ptr[int64](3600),
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/data/azappconfig/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func ExampleClient_BeginCreateSnapshot() {
},
}

_, err = client.BeginCreateSnapshot(context.TODO(), snapshotName, filter, &azappconfig.CreateSnapshotOptions{})
_, err = client.BeginCreateSnapshot(context.TODO(), snapshotName, filter, nil)

if err != nil {
// TODO: Update the following line with your application specific error handling logic
Expand Down
4 changes: 2 additions & 2 deletions sdk/data/azappconfig/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ type SetSettingOptions struct {
OnlyIfUnchanged *azcore.ETag
}

// CreateSnapshotOptions contains the optional parameters for the BeginCreateSnapshot method.
type CreateSnapshotOptions struct {
// BeginCreateSnapshotOptions contains the optional parameters for the BeginCreateSnapshot method.
type BeginCreateSnapshotOptions struct {
// Resumes the LRO from the provided token.
ResumeToken string

Expand Down

0 comments on commit e0e1d54

Please sign in to comment.