Skip to content

Commit

Permalink
Add resources that have Upload method as Create
Browse files Browse the repository at this point in the history
  • Loading branch information
mikhailshilkov committed Apr 1, 2024
1 parent 4511d6e commit bfdb2dc
Show file tree
Hide file tree
Showing 93 changed files with 15,828 additions and 7,567 deletions.
1,041 changes: 899 additions & 142 deletions provider/cmd/pulumi-resource-google-native/metadata.json

Large diffs are not rendered by default.

1,952 changes: 1,781 additions & 171 deletions provider/cmd/pulumi-resource-google-native/schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion provider/pkg/gen/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func findResourcesImpl(docName, parentName string, rest map[string]discovery.Res
postMethods = append(postMethods, restMethod)
}
switch methodName {
case "create", "insert":
case "create", "insert", "upload":
createMethod = &restMethod
case "submit", "register":
if createMethod == nil {
Expand Down
274 changes: 274 additions & 0 deletions sdk/dotnet/Aiplatform/V1/GetModel.cs

Large diffs are not rendered by default.

379 changes: 379 additions & 0 deletions sdk/dotnet/Aiplatform/V1/Model.cs

Large diffs are not rendered by default.

267 changes: 267 additions & 0 deletions sdk/dotnet/Aiplatform/V1Beta1/GetModel.cs

Large diffs are not rendered by default.

367 changes: 367 additions & 0 deletions sdk/dotnet/Aiplatform/V1Beta1/Model.cs

Large diffs are not rendered by default.

147 changes: 147 additions & 0 deletions sdk/dotnet/CloudSearch/V1/GetItem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.GoogleNative.CloudSearch.V1
{
public static class GetItem
{
/// <summary>
/// Gets Item resource by item name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
/// </summary>
public static Task<GetItemResult> InvokeAsync(GetItemArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetItemResult>("google-native:cloudsearch/v1:getItem", args ?? new GetItemArgs(), options.WithDefaults());

/// <summary>
/// Gets Item resource by item name. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
/// </summary>
public static Output<GetItemResult> Invoke(GetItemInvokeArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.Invoke<GetItemResult>("google-native:cloudsearch/v1:getItem", args ?? new GetItemInvokeArgs(), options.WithDefaults());
}


public sealed class GetItemArgs : global::Pulumi.InvokeArgs
{
[Input("connectorName")]
public string? ConnectorName { get; set; }

[Input("datasourceId", required: true)]
public string DatasourceId { get; set; } = null!;

[Input("debugOptionsEnableDebugging")]
public bool? DebugOptionsEnableDebugging { get; set; }

[Input("itemId", required: true)]
public string ItemId { get; set; } = null!;

public GetItemArgs()
{
}
public static new GetItemArgs Empty => new GetItemArgs();
}

public sealed class GetItemInvokeArgs : global::Pulumi.InvokeArgs
{
[Input("connectorName")]
public Input<string>? ConnectorName { get; set; }

[Input("datasourceId", required: true)]
public Input<string> DatasourceId { get; set; } = null!;

[Input("debugOptionsEnableDebugging")]
public Input<bool>? DebugOptionsEnableDebugging { get; set; }

[Input("itemId", required: true)]
public Input<string> ItemId { get; set; } = null!;

public GetItemInvokeArgs()
{
}
public static new GetItemInvokeArgs Empty => new GetItemInvokeArgs();
}


[OutputType]
public sealed class GetItemResult
{
/// <summary>
/// Access control list for this item.
/// </summary>
public readonly Outputs.ItemAclResponse Acl;
/// <summary>
/// Item content to be indexed and made text searchable.
/// </summary>
public readonly Outputs.ItemContentResponse Content;
/// <summary>
/// The type for this item.
/// </summary>
public readonly string ItemType;
/// <summary>
/// The metadata information.
/// </summary>
public readonly Outputs.ItemMetadataResponse Metadata;
/// <summary>
/// The name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters.
/// </summary>
public readonly string Name;
/// <summary>
/// Additional state connector can store for this item. The maximum length is 10000 bytes.
/// </summary>
public readonly string Payload;
/// <summary>
/// Queue this item belongs to. The maximum length is 100 characters.
/// </summary>
public readonly string Queue;
/// <summary>
/// Status of the item. Output only field.
/// </summary>
public readonly Outputs.ItemStatusResponse Status;
/// <summary>
/// The structured data for the item that should conform to a registered object definition in the schema for the data source.
/// </summary>
public readonly Outputs.ItemStructuredDataResponse StructuredData;
/// <summary>
/// The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. For information on how item version affects the deletion process, refer to [Handle revisions after manual deletes](https://developers.google.com/cloud-search/docs/guides/operations).
/// </summary>
public readonly string Version;

[OutputConstructor]
private GetItemResult(
Outputs.ItemAclResponse acl,

Outputs.ItemContentResponse content,

string itemType,

Outputs.ItemMetadataResponse metadata,

string name,

string payload,

string queue,

Outputs.ItemStatusResponse status,

Outputs.ItemStructuredDataResponse structuredData,

string version)
{
Acl = acl;
Content = content;
ItemType = itemType;
Metadata = metadata;
Name = name;
Payload = payload;
Queue = queue;
Status = status;
StructuredData = structuredData;
Version = version;
}
}
}
29 changes: 29 additions & 0 deletions sdk/dotnet/CloudSearch/V1/Inputs/DebugOptionsArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.GoogleNative.CloudSearch.V1.Inputs
{

/// <summary>
/// Shared request debug options for all cloudsearch RPC methods.
/// </summary>
public sealed class DebugOptionsArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// If you are asked by Google to help with debugging, set this field. Otherwise, ignore this field.
/// </summary>
[Input("enableDebugging")]
public Input<bool>? EnableDebugging { get; set; }

public DebugOptionsArgs()
{
}
public static new DebugOptionsArgs Empty => new DebugOptionsArgs();
}
}
158 changes: 158 additions & 0 deletions sdk/dotnet/CloudSearch/V1/Item.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.GoogleNative.CloudSearch.V1
{
/// <summary>
/// Creates an upload session for uploading item content. For items smaller than 100 KB, it's easier to embed the content inline within an index request. This API requires an admin or service account to execute. The service account used is the one whitelisted in the corresponding data source.
/// Auto-naming is currently not supported for this resource.
/// </summary>
[GoogleNativeResourceType("google-native:cloudsearch/v1:Item")]
public partial class Item : global::Pulumi.CustomResource
{
/// <summary>
/// Access control list for this item.
/// </summary>
[Output("acl")]
public Output<Outputs.ItemAclResponse> Acl { get; private set; } = null!;

/// <summary>
/// Item content to be indexed and made text searchable.
/// </summary>
[Output("content")]
public Output<Outputs.ItemContentResponse> Content { get; private set; } = null!;

[Output("datasourceId")]
public Output<string> DatasourceId { get; private set; } = null!;

[Output("itemId")]
public Output<string> ItemId { get; private set; } = null!;

/// <summary>
/// The type for this item.
/// </summary>
[Output("itemType")]
public Output<string> ItemType { get; private set; } = null!;

/// <summary>
/// The metadata information.
/// </summary>
[Output("metadata")]
public Output<Outputs.ItemMetadataResponse> Metadata { get; private set; } = null!;

/// <summary>
/// The name of the Item. Format: datasources/{source_id}/items/{item_id} This is a required field. The maximum length is 1536 characters.
/// </summary>
[Output("name")]
public Output<string> Name { get; private set; } = null!;

/// <summary>
/// Additional state connector can store for this item. The maximum length is 10000 bytes.
/// </summary>
[Output("payload")]
public Output<string> Payload { get; private set; } = null!;

/// <summary>
/// Queue this item belongs to. The maximum length is 100 characters.
/// </summary>
[Output("queue")]
public Output<string> Queue { get; private set; } = null!;

/// <summary>
/// Status of the item. Output only field.
/// </summary>
[Output("status")]
public Output<Outputs.ItemStatusResponse> Status { get; private set; } = null!;

/// <summary>
/// The structured data for the item that should conform to a registered object definition in the schema for the data source.
/// </summary>
[Output("structuredData")]
public Output<Outputs.ItemStructuredDataResponse> StructuredData { get; private set; } = null!;

/// <summary>
/// The indexing system stores the version from the datasource as a byte string and compares the Item version in the index to the version of the queued Item using lexical ordering. Cloud Search Indexing won't index or delete any queued item with a version value that is less than or equal to the version of the currently indexed item. The maximum length for this field is 1024 bytes. For information on how item version affects the deletion process, refer to [Handle revisions after manual deletes](https://developers.google.com/cloud-search/docs/guides/operations).
/// </summary>
[Output("version")]
public Output<string> Version { get; private set; } = null!;


/// <summary>
/// Create a Item resource with the given unique name, arguments, and options.
/// </summary>
///
/// <param name="name">The unique name of the resource</param>
/// <param name="args">The arguments used to populate this resource's properties</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public Item(string name, ItemArgs args, CustomResourceOptions? options = null)
: base("google-native:cloudsearch/v1:Item", name, args ?? new ItemArgs(), MakeResourceOptions(options, ""))
{
}

private Item(string name, Input<string> id, CustomResourceOptions? options = null)
: base("google-native:cloudsearch/v1:Item", name, null, MakeResourceOptions(options, id))
{
}

private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? options, Input<string>? id)
{
var defaultOptions = new CustomResourceOptions
{
Version = Utilities.Version,
ReplaceOnChanges =
{
"datasourceId",
"itemId",
},
};
var merged = CustomResourceOptions.Merge(defaultOptions, options);
// Override the ID if one was specified for consistency with other language SDKs.
merged.Id = id ?? merged.Id;
return merged;
}
/// <summary>
/// Get an existing Item resource's state with the given name, ID, and optional extra
/// properties used to qualify the lookup.
/// </summary>
///
/// <param name="name">The unique name of the resulting resource.</param>
/// <param name="id">The unique provider ID of the resource to lookup.</param>
/// <param name="options">A bag of options that control this resource's behavior</param>
public static Item Get(string name, Input<string> id, CustomResourceOptions? options = null)
{
return new Item(name, id, options);
}
}

public sealed class ItemArgs : global::Pulumi.ResourceArgs
{
/// <summary>
/// The name of connector making this call. Format: datasources/{source_id}/connectors/{ID}
/// </summary>
[Input("connectorName")]
public Input<string>? ConnectorName { get; set; }

[Input("datasourceId", required: true)]
public Input<string> DatasourceId { get; set; } = null!;

/// <summary>
/// Common debug options.
/// </summary>
[Input("debugOptions")]
public Input<Inputs.DebugOptionsArgs>? DebugOptions { get; set; }

[Input("itemId", required: true)]
public Input<string> ItemId { get; set; } = null!;

public ItemArgs()
{
}
public static new ItemArgs Empty => new ItemArgs();
}
}
38 changes: 38 additions & 0 deletions sdk/dotnet/CloudSearch/V1/Outputs/ContextAttributeResponse.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// *** WARNING: this file was generated by the Pulumi SDK Generator. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.GoogleNative.CloudSearch.V1.Outputs
{

/// <summary>
/// A named attribute associated with an item which can be used for influencing the ranking of the item based on the context in the request.
/// </summary>
[OutputType]
public sealed class ContextAttributeResponse
{
/// <summary>
/// The name of the attribute. It should not be empty. The maximum length is 32 characters. The name must start with a letter and can only contain letters (A-Z, a-z) or numbers (0-9). The name will be normalized (lower-cased) before being matched.
/// </summary>
public readonly string Name;
/// <summary>
/// Text values of the attribute. The maximum number of elements is 10. The maximum length of an element in the array is 32 characters. The value will be normalized (lower-cased) before being matched.
/// </summary>
public readonly ImmutableArray<string> Values;

[OutputConstructor]
private ContextAttributeResponse(
string name,

ImmutableArray<string> values)
{
Name = name;
Values = values;
}
}
}

0 comments on commit bfdb2dc

Please sign in to comment.